<{use class="frontend\assets\FancyBoxAsset"}>
<{FancyBoxAsset::register($this)|void}>

<div class="content margin_top">
    <header class="header fixed_top bg_mx_green"></header>
    <form class="user"></form>
</div>
<!-- toast模版 -->
<script type="text/template" charset="utf-8" id='info_template'>
    <div class="bg_white">
        <div class="padding_15 flex border_b">
            <div class="width_100">养殖户</div>
            <div class="left_100">
                <input type="text" disabled value="{{=it.name}}">
            </div>
        </div>
        <div class="padding_15 flex border_b">
            <div style="width: 50%;" class="col-xs-6 col-md-6 padding_3">
                <a href="{{=it.photo}}" rel="fm" class="fancybox"><img src="{{=it.photo}}" alt="" width="100%" height="100%"></a>
            </div>
            <div style="width: 50%;" class="col-xs-6 col-md-6 padding_3">
                <a href="{{=it.identity_photo}}" rel="fm" class="fancybox"><img src="{{=it.identity_photo}}" alt="" width="100%" height="100%"></a>
            </div>
        </div>
        <div class="padding_15 flex border_b">
            <div class="width_100">联系电话</div>
            <div class="left_100">
                <input type="text" disabled value="{{=it.phone}}">
            </div>
        </div>
        <div class="padding_15 flex border_b">
            <div class="width_100">代养地址</div>
            <div class="left_100">
                <input type="text" disabled value="{{=it.address}}">
            </div>
        </div>
        <div class="padding_15 flex border_b">
            <div class="width_100">简介</div>
            <div class="left_100">
                <textarea name="descripation">{{=it.descripation||''}}</textarea>
            </div>
        </div>
    </div>

</script>
<script>
    // 页面初始化
    var info = <{$detail}>;
    console.log(info)
    var evalinfo = doT.template($("#info_template").text());
    var evalToast = doT.template($("#toast_template").text());
    loaddata(".user",evalinfo,info);
    loadheadbar("养殖户资料");

    //点击预览图片
    $('.fancybox').fancybox({
        'titlePosition' : 'over',
        'cyclic'        : true,
        'height':500
    });

</script>







